﻿// Decompiled by AS3 Sorcerer 6.12
// www.as3sorcerer.com

//CellNode

package 
{
    import flash.display.Sprite;

    public class CellNode extends Sprite 
    {

        public static const TYPE1:int = 1;
        public static const TYPE2:int = 2;
        public static const TYPE3:int = 3;
        public static const TYPE4:int = 4;
        public static const TYPE5:int = 5;

        private var _SafeStr_119:Number = 0;
        private var _SafeStr_120:Number = 0;
        private var _SafeStr_95:int = 0;
        private var _SafeStr_121:Sync = null;
        private var _SafeStr_118:uint = 0;

        public function CellNode(_arg_1:int, radius:Number, angle:int, color:uint)
        {
            this._SafeStr_95 = _arg_1;
            this._SafeStr_120 = radius;
            this._SafeStr_119 = ((angle * Math.PI) / 180);
            this._SafeStr_118 = color;
            this._SafeStr_121 = new Sync(0.3);
            this.setRadius(radius);
            var tendril:Tendril;
            var pulsar:Pulsar;
            switch (this._SafeStr_95)
            {
                case TYPE1:
                    tendril = new Tendril(Tendril.TYPE_WITHOUT_SPOT, 0, 0, 10, 0.3);
                    addChild(tendril);
                    return;
                case TYPE2:
                    pulsar = new Pulsar(0, 0, color, 4);
                    tendril = new Tendril(Tendril.TYPE_WITHOUT_SPOT, 0, 0, 15, 0.3);
                    pulsar.addChildNode(tendril);
                    addChild(pulsar);
                    return;
                case TYPE3:
                    pulsar = new Pulsar(0, 0, color, 4);
                    tendril = new Tendril(Tendril.TYPE_WITH_SPOT, 0, 0, 15, 0.3);
                    tendril.setColor(this._SafeStr_118);
                    pulsar.addChildNode(tendril);
                    addChild(pulsar);
                    return;
                case TYPE4:
                    pulsar = new Pulsar(0, 0, color, 4);
                    pulsar.addChildNode(new Pulsar(0, -60, color, 3), 5);
                    pulsar.addChildNode(new Pulsar(0, 60, color, 3), 5);
                    pulsar.addChildNode(new Tendril(Tendril.TYPE_WITHOUT_SPOT, 0, -20, 15, 0.3));
                    pulsar.addChildNode(new Tendril(Tendril.TYPE_WITHOUT_SPOT, 0, 20, 15, 0.3));
                    addChild(pulsar);
                    return;
                case TYPE5:
                    pulsar = new Pulsar(0, 0, color, 5);
                    tendril = new Tendril(Tendril.TYPE_WITH_SPOT, 0, 0, 20, 0.3);
                    tendril.setColor(this._SafeStr_118);
                    pulsar.addChildNode(tendril);
                    pulsar.addChildNode(new Pulsar(0, 0, color, 3, 40), 5);
                    pulsar.addChildNode(new Pulsar(0, 120, color, 3, 40), 5);
                    pulsar.addChildNode(new Pulsar(0, 240, color, 3, 40), 5);
                    addChild(pulsar);
                    return;
            };
        }

        public function setRadius(radius:Number):void
        {
            this._SafeStr_120 = radius;
            this.x = (Math.cos(this._SafeStr_119) * this._SafeStr_120);
            this.y = (Math.sin(this._SafeStr_119) * this._SafeStr_120);
            this.rotation = ((this._SafeStr_119 * 180) / Math.PI);
        }

        public function destruct():void
        {
            var node:Node;
            while (numChildren > 0)
            {
                node = (removeChildAt(0) as Node);
                node.destruct();
            };
        }


    }
}//package 

// _SafeStr_118 = "_-BS" (String#5202, DoABC#2)
// _SafeStr_119 = "_-47" (String#4845, DoABC#2)
// _SafeStr_120 = "_-6L" (String#4954, DoABC#2)
// _SafeStr_121 = "_-Ao" (String#5173, DoABC#2)
// _SafeStr_95 = "_-5e" (String#4918, DoABC#2)


